<script setup lang="ts">
import {getCurrentInstance, inject, ref} from "vue";

const {proxy} = getCurrentInstance() as any; // 类似于this
let toBack=()=>{
  proxy.$router.go(-1)
}
let show = inject('showWin',ref(false))
let title = inject('title',ref('活动规则'))
let txt = inject('txt',ref('内容内容内容内容'))
const  closeShow = ()=>{
  show.value = false
}

</script>a

<template>
  <div class="showBox" v-if="show" @click="closeShow">
      <div class="show" @click.stop>
        <img src="@/assets/images/components/close.png" class="close" alt="" @click="closeShow">
        <div class="title">{{title}}</div>
        <div class="txt" v-html="txt"></div>
      </div>
  </div>
</template>

<style scoped lang="scss">
  .showBox{
    width: 100vw;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: flex;
    background-color: rgba(0,0,0,0.3);
    z-index: 99;
    justify-content:center;
    align-items: center;
    .show{
      width: 297px;
      min-height: 341px;
      max-height: 441px;
      background-color: white;
      border-radius: 10px;
      position: relative;
      overflow: hidden;
      .close{
        width: 12px;
        height: 13px;
        position: absolute;
        right: 12px;
        top: 13px;
        z-index: 12;
      }
      .title{
        width: 100%;
        height: 17px;
        font-family: black, sans-serif;
        font-weight: 400;
        font-size: 23px;
        color: #4957F5;
        text-align: center;
        line-height: 21px;
        margin: 26px auto 27px;
      }
      .txt::-webkit-scrollbar{
        width: 0;
      }
      .txt{
        width: 251px;
        height: 286px;
        margin: 0 auto;
        font-weight: 400;
        overflow-x: hidden;
        overflow-y: scroll;
        font-size: 13px;
        color: #000000;
        line-height: 19px;
        text-indent: 10px;
      }
    }
  }
</style>